package com.monitorRoutine.monitorRoutineController.clt;

import com.monitorRoutine.monitorRoutineController.service.ExecuteCommandService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@Slf4j
@RestController
@RequestMapping("/executelCommand")
@Api(tags = "执行命令 API")
public class ExecuteCommandController {
    @Autowired
    ExecuteCommandService executeCommandService;
    @GetMapping
    @ApiOperation(value = "命令-重启")
    public void rebootComputer( ) throws IOException {
        executeCommandService.rebootComputer();
    }

}
